{%extends "base.html"%}
{%block title%} 注册页 {%endblock%}
{%block cssLink%}
<link rel="stylesheet" href="{{url_for('static',filename='css/form.css')}}">
{{super()}}
{%endblock%}
{%block content%}
<!-- 1. 导入宏（确保 macro.html 路径正确） -->
{% from 'macro.html' import inputStyle,errorInfo %}
<h3>注册</h3>
{{errorInfo(['warning','danger'])}}
<form action="/register" method="post">
 <!--label,name,type,value,required-->
    {{ inputStyle('用户名', 'username','',value=form_data['username'] ) }}
    {{errorInfo('user-name-error')}}
    {{ inputStyle('密码', 'password','password',value=form_data['password'] ) }}
    {{errorInfo('password-error')}}
    {{ inputStyle('确认密码', 'password2','password',value=form_data['password2'] ) }}
    {{errorInfo('password2-error')}}
    <!--lable,name,type,value,required-->
    <div class="flex-container">
        {{ inputStyle('', 'submit','submit','提交') }}
        {{ inputStyle('', 'reset','reset','重置') }}
    </div>
</form>
{% endblock %}